<?php
/**
 * Created by PhpStorm.
 * User: work
 * Date: 18-6-24
 * Time: 下午3:08
 */

namespace PddWechat\Library;


class CookieLibrary
{
    const TOKEN = "TOKEN_ID";

    public static function set($key, $value, $expire){
        setcookie($key, $value, time()+$expire);
    }

    public static function get($key){
        if (isset($_COOKIE[$key])) {
            return $_COOKIE[$key];
        }else {
            return null;
        }
    }
}